﻿using SmartHotel.DAL;
using SmartHotel.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartHotel.BLL
{
    public class NlogBLL
    {
        public NlogBLL(NLogDAL nLogDAL)
        {
            NLogDAL = nLogDAL;
        }

        public NLogDAL NLogDAL { get; }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <param name="count"></param>
        /// <param name="message"></param>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        /// <returns></returns>
        public MyPage<NlogModel> GetNlogModels(int index, int size, out int count, string? message, DateTime? begin, DateTime? end) {
            MyPage<NlogModel> myPage = new MyPage<NlogModel>();
            var data = NLogDAL.GetNlogModels(index, size, out count, message, begin, end);
            myPage.Count = count;
            myPage.Size = size;
            myPage.Data = data;
            return myPage;
        }
    }
}
